package com.liuceng.zen.mapper;

import java.util.List;
import java.util.Map;

import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
import com.liuceng.zen.common.annotations.MyBatisRepository;
import com.liuceng.zen.pojo.domain.BaseDomain;

@MyBatisRepository
public interface BaseMapper<T extends BaseDomain> {
  int deleteByPrimaryKey(Integer id);

  int insertSelective(T record);

  T selectByPrimaryKey(Integer id);

  int updateByPrimaryKeySelective(T record);

  void batchInsert(List<T> records);

  List<T> search(Map<String, Object> params, PageBounds pb);

  List<T> search(Map<String, Object> params);

  int count(Map<String, Object> params);

  T findOneByParams(Map<String, Object> params);
}
